<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of soaUsers
 *
 * @author dxx
 */

namespace app\common\model\jsm;
use think\Model;

class Members extends Model {

    protected $base_table = 'jj_members';
    protected $table = 'jj_members';
    protected $connection = ['database' => 'jooj_jsm'];

    public function __construct($mp_Id = []) {
        if(!is_array($mp_Id)){
            $this->table = $this->base_table."_".$mp_Id;
        }
        parent::__construct($mp_Id);
    }
    
    public function getMembersByCondition($condition,$field='*'){
        return $this->where($condition)->field($field)->find();
    }
}
